<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 400px;
            height: 400px;
            border: 2px solid red;
        }

        .box div {
            transition: 2s;
            width: 100px;
            height: 100px;
            background: blue;
            margin-top: 50px;
            margin-left: 50px;
        }

        .box:hover div {
            transform: scale(2, 1);
        }

        .box1 {
            width: 400px;
            height: 400px;
            border: 2px solid red;
        }

        .box1 div {
            transition: 2s;
            width: 100px;
            height: 100px;
            background: blue;
            margin-top: 50px;
            margin-left: 50px;
        }

        .box1:hover div {
            transform: scale(1, 0.5);
        }
    </style>

</head>

<body>
    1.放大
    <div class="box">
        <div>放大缩小</div>
    </div>
    2.缩小
    <div class="box1">
        <div>放大缩小</div>
    </div>
    3.scale(x轴, y轴) 如果设置的值大于1就是放大效果；如果设置的值是小于1就是缩小效果
    4.scaleX x轴的放大缩小 ，scaleY y轴的放大缩小

</body>

</html>